home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Best of www.BestZips.com (Collector's Edition)
/
Best of WWW.BESTZIPS.COM Collector's Edition (JCSM Shareware) (JCS Marketing).ISO
/
prgtools
/
prtsut53.zip
/
SU1SRC.ZIP
/
REPDEM02.PAS
< prev
next >
Wrap
Pascal/Delphi Source File
|
1996-12-01
|
2KB
|
74 lines
unit Repdem02;
interface
uses
SysUtils, WinTypes, WinProcs, Messages, Classes, Graphics, Controls,
StdCtrls, Forms, DBCtrls, DB, DBGrids, Buttons, DBTables, Grids,
ExtCtrls, Printers, CB_Types, PrnGridR, CB_MFunc;
type
Tdem02form = class(TForm)
DBGrid1: TDBGrid;
Panel1: TPanel;
DataSource1: TDataSource;
Panel2: TPanel;
Query1: TQuery;
Query1CustNo: TFloatField;
Query1Company: TStringField;
Query1Country: TStringField;
Query1Phone: TStringField;
Query1Contact: TStringField;
Previews: TBitBtn;
Exit: TBitBtn;
Preview: TBitBtn;
Query1LastInvoiceDate: TDateTimeField;
Memo1: TMemo;
PrintGridReport1: TPrintGridReport;
procedure FormCreate(Sender: TObject);
procedure PreviewClick(Sender: TObject);
procedure PreviewsClick(Sender: TObject);
procedure ExitClick(Sender: TObject);
private
{ private declarations }
public
end;
var
dem02form: Tdem02form;
implementation
{$R *.DFM}
procedure Tdem02form.FormCreate(Sender: TObject);
begin
Query1.Open;
PrintGridReport1.Orientation := Portrait;
{ When printing subtotals - Use field COUNTRY }
PrintGridReport1.SetSubTotalField(1, 'COUNTRY','Country');
PrintGridReport1.SetPrintTotal('CustNo', False);
end;
procedure Tdem02form.PreviewClick(Sender: TObject);
begin
PrintGridReport1.PrintSubTotals := False;
PrintGridReport1.GridLines := True;
PrintGridReport1.Execute;
end;
procedure Tdem02form.PreviewsClick(Sender: TObject);
begin
PrintGridReport1.PrintSubTotals := True;
PrintGridReport1.Execute;
end;
procedure Tdem02form.ExitClick(Sender: TObject);
begin
Close;
end;
end.